namespace ChessKit.Common
{
  public struct MoveTarget
  {
    public BoardLocation Location { get; private set; }
    public bool RequiresPromotion { get; private set; }

    public MoveTarget(BoardLocation location, bool requiresPromotion = false) 
      : this()
    {
      Location = location;
      RequiresPromotion = requiresPromotion;
    }

    public override string ToString()
    {
      var location = "?abcdefgh?"[Location.X] + Location.Y.ToString();
      return RequiresPromotion ? location + " (promition)" : location;
    }
  }
}